package com.jic.product.mapper;

import com.jic.product.entity.ProductSaleAreaRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品销售区域关联表
 * @author : 
 * @email : 
 * @since : 2020-01-10 07:03:01
 * @version : v1.0.0
 */
@Mapper
public interface  ProductSaleAreaRelationMapper {

    long insert(ProductSaleAreaRelation productSaleAreaRelation);

    long delete(Long id);

    long update(ProductSaleAreaRelation productSaleAreaRelation);

    ProductSaleAreaRelation queryByPrimaryKey(Long id);

    List<ProductSaleAreaRelation> query(ProductSaleAreaRelation productSaleAreaRelation);

    List<ProductSaleAreaRelation> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, ProductSaleAreaRelation productSaleAreaRelation);

    long queryPageCount(ProductSaleAreaRelation productSaleAreaRelation);

    // 通过商品id 查询销售区域
    List<ProductSaleAreaRelation> queryByProductId(Long productId);
}